#pragma once
#include <list>

class CUndoCommand
{
public:
	CUndoCommand(void);
	virtual ~CUndoCommand(void);
	virtual void Commit() = 0;
	virtual void Abort() = 0;
	virtual void Do(bool bRedo) =0;
};

typedef std::list<CUndoCommand*> UndoList;

class CUndoManager
{
public:
	CUndoManager();
	void Undo();
	void Redo();
	void Add(CUndoCommand* pCommand);
private:
	UndoList m_listUndo;
	UndoList m_listRedo;
};